import request from "@/utils/request"
//登录
export const loginAPI = (data) => {
  return request({
    url: "/login/in",
    method: "post",
    data
  })
}

//获取频道
export const getChannelAPI = (params) => {
  return request({
    url: "/api/v1/channel/list",
    method: "get",
    params
  })
}

//根据id查询频道
export const getChannelByIdAPI = (id) => {
  return request({
    url: "/api/v1/channel/" + id,
    method: "get",
  })
}

//新增频道
export const saveChannelAPI = (data) => {
  return request({
    url: "/api/v1/channel/save",
    method: "post",
    data
  })
}


//更新频道
export const updateChannelAPI = (data) => {
  return request({
    url: "/api/v1/channel/update",
    method: "put",
    data
  })
}

//获取敏感词list
export const getSensitiveAPI = (params) => {
  return request({
    url: "/api/v1/sensitive/list",
    method: "get",
    params
  })
}

//新增敏感词
export const addSensitiveAPI = (data) => {
  return request({
    url: "/api/v1/sensitive/save",
    method: "post",
    data
  })
}

//根据id敏感词详情
export const getSensitiveByIdAPI = (id) => {
  return request({
    url: "/api/v1/sensitive/" + id,
    method: "get",
  })
}

//更新敏感词信息
export const updateSensitiveAPI = (data) => {
  return request({
    url: "/api/v1/sensitive/update",
    method: "put",
    data
  })
}